﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WiiGeeDotNet.events
{
  /// <summary>
  /// This Event would be generated if an acceleration has been detected.
  /// It contains information about the force applied to the device in each
  /// direction (x, y, z). Further it contains the absolute value of this
  /// vector and the source which generated this event (wiimote).
  /// </summary>
  public class AccelerationEvent
  {
    /// <summary>
    /// X Value of acceleration
    /// </summary>
    public double X
    {
      get;
      set;
    }

    /// <summary>
    /// Y Value of acceleration
    /// </summary>
    public double Y
    {
      get;
      set;
    }

    /// <summary>
    /// Z Value of acceleration
    /// </summary>
    public double Z
    {
      get;
      set;
    }

    /// <summary>
    /// Absolute value of acceleration
    /// </summary>
    public double Absvalue
    {
      get;
      set;
    }

    /// <summary>
    /// Create a WiimoteAccelerationEvent with a specific source,
    /// all the three acceleration values and the calculated absolute
    /// value.
    /// </summary>
    /// <param name="X">The value of acceleration in the x direction</param>
    /// <param name="Y">The value of acceleration in the y direction</param>
    /// <param name="Z">The value of acceleration in the z direction.</param>
    /// <param name="absvalue">The absolute value of this acceleration vector</param>
    public AccelerationEvent(double X, double Y, double Z, double absvalue)
    {
      this.X = X;
      this.Y = Y;
      this.Z = Z;
      this.Absvalue = absvalue;
    }
  }
}
